package com.fyx.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fyx.annotation.Query;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import java.sql.Timestamp;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

@Data
@Document(collection="user")
public class UserEntity {

    @javax.persistence.Transient
    private List<Timestamp> qTime;

    @Column(name = "_id")
    private String id;

    private int all_diamond;

    private int all_fee;

   // private List<BackPack> backpack;

   // private Map backpack;

    private int bcoin;

    private String channel;

    private Map completeGuides;

    private int curGuide;

    private int curState;

    private int curr_age;

    private List curr_dress;

    private Map d_diamond_c;

    private Integer live_match_flag;
//    @Column(name = "d_diamond_c.num")
//    private int DDiamondC.Num;
//
//    @Column(name = "d_diamond_c.status")
//    private int DDiamondC.Status;
//
//    @Column(name = "d_diamond_c.t")
//    private int DDiamondC.T;

    private Map d_fee_c;

//    @Column(name = "d_fee_c.num")
//    private int DFeeC.Num;
//
//    @Column(name = "d_fee_c.status")
//    private int DFeeC.Status;
//
//    @Column(name = "d_fee_c.t")
//    private int DFeeC.T;

    private long diamond;
    @Transient
    private long diamond1;
    @Transient
    private long diamond2;

    @Transient
    private String flag;

    private String idcard;

    private String realname;

    private int eat_chickenc;

    private int en_emotion;

    private Map family;

//    @Column(name = "family.own")
//    private int family.Own;
//
//    @Column(name = "family.style")
//    private int family.Style;

    private int first_buy;

    @Transient
    private int isForever;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Transient
    private List<Timestamp> forbidTime;

    private long forbidBeginTime;

    private long forbid_time;

    private String forbid_reason;

    private String forbidUserid;

    private String forbidUserName;

    private Double gold;
    @Transient
    private Double gold1;
    @Transient
    private Double gold2;

    private Map gold_give;

//    @Column(name = "gold_give.num")
//    private int goldGive.Num;
//
//    @Column(name = "gold_give.t")
//    private int goldGive.T;

    private Map growt_plan;

//    @Column(name = "growt_plan.win_count")
//    private Double growtPlan.WinCount;

    private Map growth_plan;

//    @Column(name = "growth_plan.active")
//    private String growthPlan.Active;
//
//    @Column(name = "growth_plan.award_status")
//    private int growthPlan.AwardStatus;
//
//    @Column(name = "growth_plan.win_count")
//    private int growthPlan.WinCount;

    private int headframe;

    private String headimgurl;


    @Column(name = "id")
    @Field("id")
    private String userid;

    private String invalid_headimg;

    private String invite_code;

    private String last_ip;

    private int last_recharge_time;

    private int last_time;

    private int login_time;

    private Map lottery;

//    @Column(name = "lottery.free_left")
//    private int lottery.FreeLeft;
//
//    @Column(name = "lottery.record")
//    private Map lottery.Record;
//
//    @Column(name = "lottery.record.id")
//    private int lottery.Record.Id;
//
//    @Column(name = "lottery.record.t")
//    private int lottery.Record.T;
//
//    @Column(name = "lottery.t")
//    private int lottery.T;
//
//    @Column(name = "lottery.type")
//    private int lottery.Type;

   // private int lv;

    private Map month_card;

    private Map living;

//    @Column(name = "month_card.begin_time")
//    private int monthCard.Begintime;
//
//    @Column(name = "month_card.get_time")
//    private int monthCard.GetTime;
//
//    @Column(name = "month_card.total_day")
//    private int monthCard.TotalDay;
//
//    @Column(name = "month_card.type")
//    private int monthCard.Type;
//
    private Map month_sign;

    private Map noble;

    @Transient
    private Integer vip;
//    @Column(name = "month_sign.c_award")
//    private int monthSign.CAward;
//
//    @Column(name = "month_sign.mtime")
//    private int monthSign.Mtime;
//
//    @Column(name = "month_sign.status")
//    private int monthSign.Status;
//
    private String nickname;

    private int online_time;

    private String openid;

    private String os;
    private String phone_os; //系统
    private String phone_name; //型号


    private Map pet;

//    @Column(name = "pet.id")
//    private int pet.Id;
//
//    @Column(name = "pet.own")
//    private Map pet.Own;
//
    private Map pet_food;

    private int play_gamec;

    private int recharge_diamondc;

    private int refresh_friend;

    private String refuse_friend;

    private String reg_ip;

    private long reg_time;

    @Transient
    private List<Timestamp> qregTime;

    private int ret_get_num;

    private int ret_get_time;

    private int ret_tri_time;

    private Map seven_sign;

//    @Column(name = "seven_sign.mtime")
//    private int sevenSign.Mtime;
//
//    @Column(name = "seven_sign.rf")
//    private int sevenSign.Rf;
//
//    @Column(name = "seven_sign.status")
//    private java.sql.Array sevenSign.Status;
//
    private int sex;

    private Map t_award;

//    @Column(name = "t_award.rank")
//    private int TAward.Rank;
//
//    @Column(name = "t_award.t")
//    private int TAward.T;

    private Map t_quiz;

//    @Column(name = "t_quiz.id")
//    private int TQuiz.Id;
//
//    @Column(name = "t_quiz.t")
//    private int TQuiz.T;
//
    private Map tdiamond_award;

//    @Column(name = "tdiamond_award.status")
//    private int tdiamondAward.Status;
//
    private Map three_one;

//    @Column(name = "three_one.buy_count")
//    private int threeOne.BuyCount;
//
//    @Column(name = "three_one.clearance")
//    private int threeOne.Clearance;
//
//    @Column(name = "three_one.count")
//    private int threeOne.Count;
//
//    @Column(name = "three_one.skills")
//    private Map threeOne.Skills;
//
//    @Column(name = "three_one.t")
//    private int threeOne.T;
//
    private Map tk_kings;

//    @Column(name = "tk_kings.erank")
//    private int tkKings.Erank;
//
//    @Column(name = "tk_kings.et")
//    private int tkKings.Et;
//
//    @Column(name = "tk_kings.st")
//    private int tkKings.St;

    private String today;

    private Map unlocks;

    private int win_gamec;

    @Transient
    private Long deptId;

    @Query(propName = "id", type = Query.Type.IN, joinName = "dept")
    @javax.persistence.Transient
    private Set<Long> deptIds = new HashSet<>();

    private Map playinfo;

    @Transient
    private Long goldsCount;

    @Transient
    private Long diamondCount;

    private Map bank;

    @Transient
    private String bankgold;

    @Transient
    private int bankLevel;

    @Transient
    private long bankgold1;
    @Transient
    private long bankgold2;

    private long countgold;

    private String unionid;

    @Transient
    private Long forbidGold;

    @Transient
    private Long forbidDiamond;

    private int markNum;

    private String signUserid;

    private String signUserName;

    @Transient
    private String num;

    private String phone_idfa;

    @Transient
    private String isForbid;


    private int total;


    private int winc;

}
